home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-19 | 9.8 KB | 355 lines | [TEXT/MPS ] |
- //# Copyright: © 1993-94 by Apple Computer, Inc., all rights reserved.
- #ifndef _PART_
- #define _PART_
-
- #ifndef _PSTOBJ_
- #include "PstObj.idl"
- #endif
-
- //==============================================================================
- // Constants
- //==============================================================================
-
- const ODID kNewGroup = 0;
-
- //==============================================================================
- // Classes defined in this interface
- //==============================================================================
-
- interface ODPart;
-
- //==============================================================================
- // Classes used by this interface
- //==============================================================================
-
- interface ODCanvas;
- interface ODFacet;
- interface ODFrame;
- interface ODLink;
- interface ODLinkSource;
- interface ODShape;
- interface ODStorageUnit;
- interface ODStorageUnitView;
- interface ODTransform;
- interface ODDragItemIterator;
- interface ODSession;
- interface ODTypeSet;
- interface ODEmbeddedFramesIterator;
-
- //# $$$$$ struct ODPoint;
-
- //==============================================================================
- // ODPart
- //==============================================================================
-
- interface ODPart : ODPersistentObject
- {
-
- //-------------------------------------------------------------------------
- // From DragAndDrop protocol
- //-------------------------------------------------------------------------
-
- void FulfillPromise(in ODStorageUnitView promiseSUView);
-
- void DropCompleted(in ODPart destPart,
- in ODDropResult dropResult);
-
- void DragEnter(in ODDragItemIterator dragInfo,
- in ODFacet facet,
- in ODPoint where);
-
- void DragWithin(in ODDragItemIterator dragInfo,
- in ODFacet facet,
- in ODPoint where);
-
- void DragLeave(in ODFacet facet,
- in ODPoint where);
-
- ODDropResult Drop(in ODDragItemIterator dropInfo,
- in ODFacet facet,
- in ODPoint where);
-
- //-------------------------------------------------------------------------
- // From Embedding protocol
- //-------------------------------------------------------------------------
-
- void ContainingPartPropertiesChanged(in ODFrame frame,
- in ODStorageUnit propertyUnit);
-
- // ********* for containing parts *********
-
- ODStorageUnit GetContainingPartProperties(in ODFrame frame);
-
- void RevealFrame(in ODFrame embeddedFrame,
- in ODShape revealShape);
-
- void EmbeddedFrameSpec(in ODFrame embeddedFrame,
- in ODObjectSpec spec);
-
- ODEmbeddedFramesIterator CreateEmbeddedFramesIterator(in ODFrame frame);
-
- //-------------------------------------------------------------------------
- // From Frames protocol
- //-------------------------------------------------------------------------
-
- void AddDisplayFrame(in ODFrame frame);
-
- void AttachSourceFrame(in ODFrame frame,
- in ODFrame sourceFrame);
-
- void RemoveDisplayFrame(in ODFrame frame);
-
- void CloseDisplayFrame(in ODFrame frame);
-
- void FrameShapeChanged(in ODFrame frame);
-
- void ViewTypeChanged(in ODFrame frame);
-
- void PresentationChanged(in ODFrame frame);
-
- void WritePartInfo(in ODPtr partInfo,
- in ODStorageUnitView storageUnitView);
-
- ODPtr ReadPartInfo(in ODFrame frame,
- in ODStorageUnitView storageUnitView);
-
- ODID Open(in ODFrame frame);
-
- //---------------------------------
- // for containing parts
-
- ODFrame CreateEmbeddedFrame(in ODFrame containingFrame,
- in ODShape frameShape,
- in ODTransform externalTransform,
- in ODPart embedPart,
- in ODTypeToken viewType,
- in ODTypeToken presentation,
- in ODID frameGroupID,
- in ODBoolean isOverlaid);
-
- // create a new frame and embed a part in it.
-
- void RemoveEmbeddedFrame(in ODFrame embeddedFrame);
-
- ODShape RequestFrameShape(in ODFrame embeddedFrame,
- in ODShape frameShape);
-
- void UsedShapeChanged(in ODFrame embeddedFrame);
-
- ODShape AdjustBorderShape(in ODFrame embeddedFrame,
- in ODShape shape);
-
- //-------------------------------------------------------------------------
- // From Facet protocol
- //-------------------------------------------------------------------------
-
- void FacetAdded(in ODFacet facet);
-
- void FacetRemoved(in ODFacet facet);
-
- void CanvasChanged(in ODFacet facet);
-
- void ClipShapeChanged(in ODFacet facet);
-
- void ExternalTransformChanged(in ODFacet facet);
-
- //-------------------------------------------------------------------------
- // From Imaging protocol
- //-------------------------------------------------------------------------
-
- void Draw(in ODFacet facet,
- in ODShape invalidShape);
-
- void CanvasUpdated(in ODCanvas canvas);
-
- void HighlightChanged(in ODFacet facet);
-
- ODULong GetPrintResolution(in ODFrame frame);
-
- //-------------------------------------------------------------------------
- // From Linking protocol
- //-------------------------------------------------------------------------
-
- ODLink CreateLink(in ODPtr data,
- in ODULong size);
-
- void LinkUpdated(in ODLink updatedLink,
- in ODChangeID id);
-
- void RevealLink(in ODLinkSource linkSource);
-
- void EmbeddedFrameChanged(in ODFrame frame,
- in ODChangeID change);
-
- void LinkStatusChanged(in ODFrame frame);
-
- //-------------------------------------------------------------------------
- // From Part Activation protocol
- //-------------------------------------------------------------------------
-
- ODBoolean BeginRelinquishFocus(in ODTypeToken focus,
- in ODFrame ownerFrame,
- in ODFrame proposedFrame);
-
- void CommitRelinquishFocus(in ODTypeToken focus,
- in ODFrame ownerFrame,
- in ODFrame proposedFrame);
-
- void AbortRelinquishFocus(in ODTypeToken focus,
- in ODFrame ownerFrame,
- in ODFrame proposedFrame);
-
- void FocusAcquired(in ODTypeToken focus,
- in ODFrame ownerFrame);
-
- void FocusLost(in ODTypeToken focus,
- in ODFrame ownerFrame);
-
-
- //-------------------------------------------------------------------------
- // From Storage protocol
- //-------------------------------------------------------------------------
-
- void CloneInto(in ODDraftKey key,
- in ODStorageUnit storageUnit,
- in ODStorageUnit initiatingFrame);
-
- //-------------------------------------------------------------------------
- // From Binding protocol
- //-------------------------------------------------------------------------
-
- void ExternalizeKinds(in ODTypeSet kindset);
-
- void ChangeKind(in ODType kind);
-
- //-------------------------------------------------------------------------
- // From UI Events protocol
- //-------------------------------------------------------------------------
-
- ODBoolean HandleEvent(in ODEventData event,
- in ODFrame frame,
- in ODFacet facet);
-
- ODBoolean HandleEventInEmbedded(in ODEventData event,
- in ODFrame frame,
- in ODFacet facet,
- in ODFrame embeddedFrame,
- in ODFacet embeddedFacet);
-
- void MouseEnter(in ODFacet facet,
- in ODPoint where);
-
- void MouseWithin(in ODFacet facet,
- in ODPoint where);
-
- void MouseLeave(in ODFacet facet);
-
- void AdjustMenus(in ODFrame frame);
-
- //-------------------------------------------------------------------------
- // From Undo protocol
- //-------------------------------------------------------------------------
-
- void UndoAction(in ODActionData actionState);
-
- void RedoAction(in ODActionData actionState);
-
- void DisposeActionState(in ODActionData actionState,
- in ODDoneState doneState);
-
- void WriteActionState(in ODPtr actionState,
- in ODStorageUnitView storageUnitView);
-
- ODPtr ReadActionState(in ODStorageUnitView storageUnitView);
-
- // private by convention
-
- //-------------------------------------------------------------------------
- // constructors/destructors
- //-------------------------------------------------------------------------
-
-
-
- void InitPart(in ODStorageUnit storageUnit);
-
- void InitPartFromStorage(in ODStorageUnit storageUnit);
-
- #ifdef __SOMIDL__
- implementation
- {
- override:
- somInit,
- somUninit;
- releaseorder:
- FulfillPromise,
- DropCompleted,
- DragEnter,
- DragWithin,
- DragLeave,
- Drop,
- ContainingPartPropertiesChanged,
- GetContainingPartProperties,
- RevealFrame,
- EmbeddedFrameSpec,
- CreateEmbeddedFramesIterator,
- AddDisplayFrame,
- AttachSourceFrame,
- RemoveDisplayFrame,
- CloseDisplayFrame,
- FrameShapeChanged,
- ViewTypeChanged,
- PresentationChanged,
- WritePartInfo,
- ReadPartInfo,
- Open,
- CreateEmbeddedFrame,
- RemoveEmbeddedFrame,
- RequestFrameShape,
- UsedShapeChanged,
- AdjustBorderShape,
- FacetAdded,
- FacetRemoved,
- CanvasChanged,
- ClipShapeChanged,
- ExternalTransformChanged,
- Draw,
- CanvasUpdated,
- HighlightChanged,
- GetPrintResolution,
- CreateLink,
- LinkUpdated,
- RevealLink,
- EmbeddedFrameChanged,
- LinkStatusChanged,
- BeginRelinquishFocus,
- CommitRelinquishFocus,
- AbortRelinquishFocus,
- FocusAcquired,
- FocusLost,
- CloneInto,
- ExternalizeKinds,
- ChangeKind,
- HandleEvent,
- HandleEventInEmbedded,
- MouseEnter,
- MouseWithin,
- MouseLeave,
- AdjustMenus,
- UndoAction,
- RedoAction,
- DisposeActionState,
- WriteActionState,
- ReadActionState,
- InitPart,
- InitPartFromStorage;
-
- };
- #endif
- };
-
-
-
- #endif // _PART_
-
-
-